import React from 'react';
// also exported from '@storybook/react' if you can deal with breaking changes in 6.1
import { Story, Meta } from '@storybook/react/types-6-0';

import { Alert, AlertProps } from './alert';

export default {
  title: 'Example/Alert',
  component: Alert,
  argTypes: {
    backgroundColor: { control: 'color' },
  },
} as Meta;

const Template: Story<AlertProps> = (args) => <Alert {...args} style={{ marginLeft: '2em' }}/>;

export const Success = Template.bind({});
Success.args = {
  type: 'success',
  message: "Success Text",
  description: "Success Description Success Description Success Description Success Description Success Description Success Description",
  closable: true
};

export const Default = Template.bind({});
Default.args = {
  type: 'default',
  message: "Default Text",
  description: "Error Description Error Description Error Description Error Description Error Description Error Description",
  closable: true
};

export const Danger = Template.bind({});
Danger.args = {
  type: 'danger',
  message: "Danger Text",
  description: "Danger Description Danger Description Danger Description Danger Description Danger Description Danger Description",
  closable: true
};

export const Warning = Template.bind({});
Warning.args = {
  type: 'warning',
  message: "Warning Text",
  description: "Warning Description Warning Description Warning Description Warning Description Warning Description Warning Description",
  closable: true
};

